const ENV = process.env.NODE_ENV
// const SERVER_DOMAIN = ENV === 'production' ? '47.96.62.199/eduMobile/mobile' : '47.96.62.199/eduMobile/mobile'
const SERVER_DOMAIN = 'localhost:8080/eduMobile/mobile'
// const SERVER_DOMAIN = '47.110.141.221/eduMobile/mobile'
// 正式
// const SERVER_DOMAIN = ENV === 'production' ? 'qqc.hztangong.com/a' : '114.55.103.65:8089/a
// const SERVER_DOMAIN = ENV === 'production' ? window.location.host : '114.55.103.65:8087/app'
// const SERVER_DOMAIN = ENV === 'production' ? window.location.host : '192.168.0.118:8080/qsng_wx/app'
const SERVER_HOST = 'http://' + SERVER_DOMAIN + '/'
const API = {

  // 注册 post
  WXSEND: '/app/template/wxSend',

  // 通知
  // 我的通知 get
  NOTICELIST: 'student/noticeList.do',
  // 通知详情 GET
  NOTICEVIEW: 'student/noticeView.do',

  // 年级段 GET
  GRADELIST: 'common/gradeList.do',
  // 我的点到 今日点到 GET
  STUDENTSIGNTODAY: 'student/signToday.do',
  // 我的点到 点到统计 GET
  SIGNTERM: 'student/signTerm.do',
  // 点到详情 GET
  SIGNLIST: 'student/signList.do',
  // 我的班级 GET
  CLASSLIST: 'student/clazzList.do',
  // 修改个人信息 POST
  EDITPROFILE: 'student/editprofile.do',
  // 根据预约号查询我的报名班级详情   get
  QUERYBYRESERVENO: 'front/searchApply.do',
  NOTIFYAPI: 'api/notify.do',
  STUDENTSCHEDULE: 'student/schedule.do' //  get
}
const output = {}
for (let key in API) {
  output[key] = SERVER_HOST + API[key]
}
output['SERVER_DOMAIN'] = SERVER_DOMAIN
output['SERVER_HOST'] = SERVER_HOST
output['ENV'] = ENV
output['PAYMENT_API'] = 'http://txzfzx.hztangong.com/zfzx'

// output['PAYMENT_API'] = 'bm.qsng.cn/eduplatform'

// const SERVER_PLATFORM = ENV === 'production' ? '47.96.62.199/eduplatform' : 'localhost:8080/eduplatform'
// const SERVER_PLATFORM = 'localhost:8081/eduplatform'
const SERVER_PLATFORM = 'bm.qsng.cn/eduplatform'
// const SERVER_PLATFORM = '47.110.141.221/eduplatform'
const SERVER_PLATFORM_HOST = 'http://' + SERVER_PLATFORM + '/'
const PLATFORM_API = {
  // 字典列表
  DICTLIST: 'api/public/sys/dict/list',
  // 机构字典
  ORGDICTLIST: 'api/public/sys/orgDict/list',
  // 机构区域
  AREALIST: 'common/areaList.do',
  // 专业分类
  SPECIALTYLIST: 'api/public/bs/specialty/list',
  // 班级列表
  CLASSLISTDO: 'api/public/ic/iclass/list',
  MYCLASSLIST: 'api/public/ic/iclass/myList',
  // 班级详情
  CLAZZVIEW: 'api/public/ic/iclass/detail',
  // 班级报名
  CLASSAPPLY: 'api/my/px/apply/applyOnline',
  // 机构配置
  SETTING: 'api/public/sys/info/getSettingByOrg',
  STUDENTVIEW: 'api/my/stu/student/detail',
  STUDENTUPDATE: '/api/my/stu/student/update',
  LOGIN: 'api/public/sys/user/login',
  REGISTER: 'api/public/stu/student/register',
  CHECKEXIST: 'api/public/stu/student/checkExisting',
  VALIDIDCARD: 'api/public/sys/optUser/validateIdCard',
  CHECKIDCARDEXIST: 'api/public/stu/student/checkIdCardNoExisting',
  BSPCLASSLIST: 'api/public/teacher/bspClazzList',
  SIGNCLASSSCHEDULE: 'api/public/teacher/signClassSchedule',
  NEWSIGNSTUDENTLIST: 'api/public/teacher/newSignStudentList',
  SIGNADD: 'api/public/teacher/signAdd',
  SIGNEDIT: 'api/public/teacher/signEdit',
  TEACHERSIGN: 'api/public/teacher/teacherSign',
  LEAVELIST: 'api/public/teacher/leaveList',
  LEAVEFORM: 'api/public/teacher/leaveForm',
  LEAVESAVE: 'api/public/teacher/leaveSave',
  LEAVEDELETE: 'api/public/teacher/leaveDel',
  SAMECLASS: 'api/public/stu/student/querySameClass',
  CLAZZCHANGE: 'api/public/stu/student/clazzChange',
  LOGOUT: '/api/public/sys/user/exit',
  // 我的点到 今日点到
  STUDENTSIGNTODAY: 'api/my/stu/student/todaySignList',
  // 我的点到 点到统计
  SIGNTERM: 'api/my/stu/student/studSignIn',
  // 上传图片
  uploadProfilePic: 'api/my/sys/attachFile/uploadProfilePic',
  getProfilePic: 'api/my/sys/attachFile/getProfilePic',
  setBspId: 'api/my/sys/attachFile/setBspId',
  QRSignIn: 'api/public/teacher/QRSignIn',
  agentTeachList: 'api/public/teacher/agentTeachList'
}
for (let key in PLATFORM_API) {
  output[key] = SERVER_PLATFORM_HOST + PLATFORM_API[key]
}
output['SERVER_PLATFORM'] = SERVER_PLATFORM
output['SERVER_PLATFORM_HOST'] = SERVER_PLATFORM_HOST
module.exports = output
